<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('俱乐部剑道列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>俱乐部剑道编号：</label>
                                <input type="text" name="stripcode"/>
                            </li>
                            <li>
                                <label>剑道类型：</label>
                                <select name="striptype" th:with="type=${@dict.getType('club_jd_type')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <label>桁架轨道：</label>
                                <input type="text" name="truss"/>
                            </li>
                            <li>
                                <label>桁架电控：</label>
                                <input type="text" name="trusscontrol"/>
                            </li>
                            <li>
                                <label>接近开关状态：</label>
                                <input type="text" name="input01"/>
                            </li>
                            <li>
                                <label>平板版本号：</label>
                                <input type="text" name="tabletver"/>
                            </li>
                            <li>
                                <label>平板程序名称：</label>
                                <input type="text" name="tabletsoftware"/>
                            </li>
                            <li>
                                <label>剑道状态：</label>
                                <select name="Dstripstatus" th:with="type=${@dict.getType('club_jd_status')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="club:strip:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="club:strip:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="club:strip:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="club:strip:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('club:strip:edit')}]];
        var removeFlag = [[${@permission.hasPermi('club:strip:remove')}]];
        var striptypeDatas = [[${@dict.getType('club_jd_type')}]];
        var partsDatas = [[${@dict.getType('club_jd_part')}]];
        var DstripstatusDatas = [[${@dict.getType('club_jd_status')}]];
        var prefix = ctx + "club/strip";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "俱乐部剑道",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'stripid',
                    title: '剑道ID',
                    visible: false
                },
                {
                    field: 'clubid',
                    title: '俱乐部ID',
                    visible: false
                },
                {
                    field: 'stripcode',
                    title: '俱乐部剑道编号'
                },
                {
                    field: 'striptype',
                    title: '剑道类型',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(striptypeDatas, value);
                    }
                },
                {
                    field: 'parts',
                    title: '部件',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(partsDatas, value);
                    }
                },
                {
                    field: 'model',
                    title: '模块'
                },
                {
                    field: 'SN',
                    title: '编号'
                },
                {
                    field: 'supplier',
                    title: '部件厂家'
                },
                {
                    field: 'truss',
                    title: '桁架轨道'
                },
                {
                    field: 'trusscontrol',
                    title: '桁架电控'
                },
                {
                    field: 'tablet',
                    title: '靶人平板'
                },
                {
                    field: 'target',
                    title: '靶人'
                },
                {
                    field: 'box',
                    title: '集线盒'
                },
                {
                    field: 'driver',
                    title: '关节电机'
                },
                {
                    field: 'laser',
                    title: '激光传感器'
                },
                {
                    field: 'tilt',
                    title: '倾角传感器'
                },
                {
                    field: 'proximity',
                    title: '接近开关'
                },
                {
                    field: 'camera',
                    title: '摄像头'
                },
                {
                    field: 'arm',
                    title: '机械手臂'
                },
                {
                    field: 'laserid',
                    title: '激光传感器编号'
                },
                {
                    field: 'dis',
                    title: '距离'
                },
                {
                    field: 'xangle',
                    title: 'x轴角度'
                },
                {
                    field: 'yangle',
                    title: 'y轴角度'
                },
                {
                    field: 'zangle',
                    title: 'z轴角度'
                },
                {
                    field: 'xacc',
                    title: 'x轴加速度'
                },
                {
                    field: 'yacc',
                    title: 'y轴加速度'
                },
                {
                    field: 'zacc',
                    title: 'z轴加速度'
                },
                {
                    field: 'driverangle',
                    title: '关节电机角度'
                },
                {
                    field: 'trussloc',
                    title: '桁架电控位置'
                },
                {
                    field: 'trussv',
                    title: '桁架电控速度'
                },
                {
                    field: 'input01',
                    title: '接近开关状态'
                },
                {
                    field: 'tabletver',
                    title: '平板版本号'
                },
                {
                    field: 'tabletsoftware',
                    title: '平板程序名称'
                },
                {
                    field: 'tabletuploadtime',
                    title: '平板上传时间'
                },
                {
                    field: 'tabletupgradestime',
                    title: '平板升级时间'
                },
                {
                    field: 'tabletofflinetime',
                    title: '平板离线时间'
                },
                {
                    field: 'servicetime',
                    title: '平板开机时长'
                },
                {
                    field: 'failuretime',
                    title: '平板故障时长'
                },
                {
                    field: 'runningtime',
                    title: '累计运行时长'
                },
                {
                    field: 'runningdis',
                    title: '累计运行距离'
                },
                {
                    field: 'Dstripstatus',
                    title: '剑道状态',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(DstripstatusDatas, value);
                    }
                },
                {
                    field: 'striplength',
                    title: '剑道长度'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.stripid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.stripid + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>